//
//  AppSettings.h
//  SmartVideo
//
//  Created by nsm on 2019/3/7.
//  Copyright © 2019 nani. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

/// InfoPlist中自定义配置字段
extern NSString * const kConfiguration;
extern NSString * const kRoute;    // 域名模式(YES:路由分发,NO:固定)
extern NSString * const kChannel;  // 打包渠道(YES:99商店版,NO:299企业版),影响第三方配置
extern NSString * const kVersion;  // 发布版本(YES:正式版,NO:测试版),影响域名

extern NSString * const kEnterprise;
extern NSString * const kPersonal;

extern NSString * const kAMapAppkey;
extern NSString * const kJPUSHAppkey;
extern NSString * const kUMSocialAppkey;
extern NSString * const kWechatAppkey;
extern NSString * const kWechatAppSecret;
extern NSString * const kQQAppkey;
extern NSString * const kQQAppSecret;

extern NSString * const kSalt;
extern NSString * const kRouteDomain;
extern NSString * const kFormalDomain;
extern NSString * const kBetaDomain;

CF_EXTERN_C_BEGIN

NSDictionary *PrivateData(void);
NSDictionary *ConfigurationDictionary(void);
NSDictionary *PlatformDictionary(void);
BOOL         IsFormalVersion(void);
NSString     *CurrentDomain(void);
NSString     *CurrentSocketDomain(void);

#pragma mark - encode
NSDictionary *EncodeDictionary(NSDictionary *dict);

#pragma mark - 扩展
UIImage *PlaceholderImage(void);
void EndEditing(void);

CF_EXTERN_C_END

@interface AppSettings : NSObject

+ (void)setup;

/**
 获取权限
 
 enabled        服务是否允许
 notDetermined  是否未确定
 */
+ (void)locationServicesPermission:(void(^)(BOOL enabled, BOOL notDetermined))handler;

/**
 调起第三方导航
 苹果/百度/高德/谷歌
 
 @param viewController  展示弹出框的控制器
 @param coordinate      目的地
 @param name            目的地名字
 */
+ (void)navigateOnViewController:(UIViewController *)viewController
                     destination:(CLLocationCoordinate2D)coordinate
                 destinationName:(NSString *)name;

@end

NS_ASSUME_NONNULL_END
